home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / Locus / Source / ActivatorBar.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  91 lines

  1.  
  2. /*
  3.     Copyright 1993  Jeremy Slade.
  4.  
  5.     You are free to use all or any parts of the Locus project
  6.     however you wish, just give credit where credit is due.
  7.     The author (Jeremy Slade) shall not be held responsible
  8.     for any damages that result out of use or misuse of any
  9.     part of this project.
  10.  
  11. */
  12.  
  13. /*
  14.     Project: Locus
  15.     
  16.     Class: ActivatorBar
  17.         
  18.     Description:
  19.  
  20.     Provides functionality required for Acitvation bars used by the Activator. ActivatorBar has two basic duties:
  21.     1) Size and position itself to a particular edge of the screen
  22.     2) Notify the delegate (the Activator) when the bar is clicked on
  23.     
  24.     Original Author: Jeremy Slade
  25.     
  26.     Revision History:
  27.         Created
  28.             V.101    JGS Tue Feb  2 18:42:19 GMT-0700 1993
  29.  
  30. */
  31.  
  32.  
  33. #ifndef ActivatorBar_h
  34. #define ActivatorBar_h
  35.  
  36. #define ActivatorBar_VERSION     (101)
  37.  
  38.  
  39. #import <appkit/Panel.h>
  40.  
  41.  
  42. // Position settings -- which edge of the screen is the bar on?
  43. #define ABAR_NONE        0
  44. #define ABAR_TOP        1
  45. #define ABAR_RIGHT        2
  46. #define ABAR_BOTTOM        3
  47. #define ABAR_LEFT        4
  48.  
  49.  
  50. @interface ActivatorBar : Panel
  51. {
  52.     int    pos;
  53. }
  54.  
  55. // Creating, initializing
  56. + initialize;
  57. - initAt:(int)position;
  58. - free;
  59.  
  60. // Setting position
  61. - setPosition:(int)position;
  62. - setColor:(NXColor)color;
  63. - setBorderColor:(NXColor)color;
  64. - show:sender;
  65. - hide:sender;
  66.  
  67. // Trapping mouseDown events
  68. - barHit:sender;
  69.  
  70. // NXDraggingDestination Protocol
  71. - (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender;
  72. - (NXDragOperation)draggingUpdated:(id <NXDraggingInfo>)sender;
  73. - draggingExited:(id <NXDraggingInfo>)sender;
  74. - (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender;
  75. - (BOOL)performDragOperation:(id <NXDraggingInfo>)sender;
  76. - concludeDragOperation:(id <NXDraggingInfo>)sender;
  77.  
  78. // Misc
  79. - (BOOL)canBecomeKeyWindow;
  80. - (BOOL)canBecomeMainWindow;
  81.  
  82. @end
  83.  
  84.  
  85. @interface Object ( ActivatorBarDelegate )
  86. - barHit:sender;
  87. @end
  88.  
  89. #endif // ActivatorBar_h
  90.  
  91.